package com.example.demo.service;

import com.example.demo.domain.Demo;
import com.example.demo.dao.DemoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class DemoService {

    @Autowired
    DemoDao demoDao;

    public Demo queryOne(Integer id) {
        return demoDao.selectByPrimaryKey(id);
    }

    public int insert(Demo demo) {
        return demoDao.insert(demo);

    }
}
